package com.lihan.GetSeatInLib.Repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.lihan.GetSeatInLib.Domain.User;

@Repository
public interface UserRepository extends JpaRepository<User, Long>{

	//更具UserName属性查找User
	@Query("from User where UserName = ?1")
	public User getUserByName(String username);
	
	//查找指定用户名和密码的的User
	@Query("from User where UserName = ?1 and Password = ?2")
	public User LoginCheck(String username,String password);
}
